#ifndef __AGNSS_H__
#define __AGNSS_H__
#define EPH_TIME_FILE "/ephTime.txt"
#define EPH_FILE_PATH "/ephData.bin"
#define AM_LOCATION_SERVICE_RCV_TIMEOUT 15

#define AM_LOCATION_SERVICE_LOCATION_BCD_LEN 5

#define LBSLOC_SUCCESS          0x0
#define UNKNOWN_LOCATION        0x1
#define PERMISSION_ERROR        0x2
#define UNKNOWN_ERROR           0x4
#define WIFILOC_SUCCESS         0xff

typedef enum
{
    BSLOC_SUCCESS = 0,
    BSLOC_PROCESS_FAIL,
    BSLOC_UNKNOWN_LOCATION,
    BSLOC_PERMISSION_ERROR,
    BSLOC_UNKNOWN_ERROR,
    BSLOC_RECV_FAIL,
    BSLOC_REQUEST_FAIL,
    BSLOC_CELL_ASYNC_FAIL,
    BSLOC_GET_NOTUFY_CELL_FAIL,
    BSLOC_DNS_FAIL,
}BSLOC_STATE_E;

typedef struct bsloc_t
{
    int latitude;
    int longitude;
    time_t ts;
    BSLOC_STATE_E result;
} BASE_LOC_T;

// struct am_location_service_rsp_data_t
// {
//     uint8_t result;
//     uint8_t latitude[AM_LOCATION_SERVICE_LOCATION_BCD_LEN];
//     uint8_t longitude[AM_LOCATION_SERVICE_LOCATION_BCD_LEN];
//     uint8_t year;
//     uint8_t month;
//     uint8_t day;
//     uint8_t hour;
//     uint8_t minute;
//     uint8_t second;
// };
void task_ephemeris(void);
#endif